﻿using System.ServiceModel;
using System.Xml.Serialization;
namespace Order
{
    [MessageContract(WrapperNamespace = "http://facade/orders")]
    public class OrderRequest
    {
        [MessageBodyMember(Namespace = "http://facade/orders")]
        public string ItemCode;

        [MessageBodyMember(Namespace = "http://facade/orders")]
        public int Qty;
    }

    [MessageContract(WrapperNamespace = "http://facade/orders")]
    [XmlRoot(Namespace = "http://facade/orders")]
    public class OrderResponse
    {
        [MessageBodyMember(Namespace = "http://facade/orders")]
        public string TrackingCode;
    }

    [ServiceContract]
    public interface IOrder
    {
        [OperationContract(ReplyAction = "*")]
        OrderResponse PlaceOrder(OrderRequest request);
    }
}
